*********************************************************************************************************************
Replication files for: Presidential Policymaking, 1877-2020

Aaron Kaufman, New York University, Abu Dhabi (aaronkaufman@nyu.edu)
Jon Rogowski, University of Chicago (jrogowski@uchicago.edu)

This version: November 2023

This repository contains the data and code necessary to replicate the analyses in the manuscript and online appendix. 

*********************************************************************************************************************

Computing: Analyses were conducted with Windows 10 Enterprise. Processor: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz. Installed memory (RAM): 512.0 GB. 

Platform: x86_64-w64-mingw32/x64 (64-bit).

R commands were executed on R version 4.1.0 (2021-05-18) using the following versions of each package:
	Package		Version
	tm 				0.7.8
	gdata 			2.18.0.1
	mosaic 			1.8.3
	gsubfn 			0.7
	quanteda 		3.2.1
	quanteda.textmodels 		0.9.4
	xtable 			1.8.4
	ranger 			0.14.1
	openxlsx 		4.2.5
	pROC 			1.18.0
	glmnet 			4.1.4
	tidyr 			1.3.0
	caret 			6.0.92
	lm.br 			2.9.6
	tidyerse 		2.0.0
	mcmcpack		1.6.3
	stargazer 		5.2.3
	ggplot2 		3.4.1
	strucchange 	1.5.3
	mcp 			0.3.3
	ecp 			3.1.4
	readstata13 	0.10.1
	dplyr 			1.1.0

Stata commands were executed on Stata/MP 18.0.

*********************************************************************************************************************

The following files are necessary to replicate the analyses reported in the article and the online appendix:

Figures 1-5, A.1-A.2, B.1, C.1-C.2; Tables B.1-B.3:
* replication.R
* unilateral_preds.csv
* noncere_EOs_1905_2013.dta
* sig EOs.dta
* memos.dta
* recent_noncere_EOs.csv
* US-Public-Gallups_Most_Important_Problem-21.2.csv
* train_test_data.RData
* tmp_policy_classifier.RData

Tables 2, 3, E.1-E.3:
* stata_replications.do
* approval_unilateral.dta
* unilateral_media.dta

Readers interested in reproducing the estimates of significance and policy
area should consult the following:
* build_models.R
* train_test_data.RData
* exec_action_1900_2019.RData
* procs.RData


*********************************************************************************************************************

The following variables are used in the analyses reported in the article and the online appendix:

* based upon unilateral_preds.csv and related data:
year = year
numsig = number of significant directives issued in year
numdocs = total number of directives issued in year
issue = estimated issue area corresponding to Comparative Agendas Project coding
allnoncerm_eo = number of nonceremonial executive orders issued in year
doctype = directive category
Significance_rf: directive significance estimated via random forest
sig_eo = number of significant executive orders issued in year
percent = share of public reporting a given issue is the most important problem
accession = accession number of directive
traintest = indicates whether document was in test or training set
ceremonial = indicates whether a proclamation was ceremonial


* approval_unilateral.dta:
newapprovalkalman: monthly presidential approval
eosnytwithinyear: number of monthly executive orders mentioned by the New York Times within one year
sig_action: number of significant directives issued in a month
summed_sig: aggregated significance of all directives issued in a month
sig_action_eo: number of significant executive orders issued in a month
summed_sig_eo: aggregated significance of executive orders issued in a month
sig_action_mm: number of significant memoranda issued in a month
summed_sig_mm: aggregated significance of memoranda issued in a month
sig_action_pr: number of significant proclamations issued in a month
summed_sig_pr: aggregated significance of proclamations issued in a month
ike: indicator for Eisenhower administration
jfk: indicator for Kennedy administration
lbj: indicator for Johnson administration
rmn: indicator for Nixon administration
ford: indicator for Ford administration
carter: indicator for Carter administration
reagan: indicator for Reagan administration
bush: indicator for Bush 41 administration
clinton: indicator for Clinton administration
wbush: indicator for Bush 43 administration
obama: indicator for Obama administration
trump: indicator for Trump administration
dg: indicator for whether at least one chamber of Congress is controlled by the party opposite from the president
ics: Index of Consumer Sentiment 
war: indicator for periods of war (Korea, Vietnam, Persian Gulf, Iraq/Afghanistan) 
anylaw: number of significant laws enacted

* unilateral_media.dta:
EO: indicator for whether at least one executive order was signed on a given day
any_directives: indicator for whether at least one directive was signed on a given day
any_sig_directives: indicator for whether at least one significant directive was signed on a given day
divided: indicator for whether at least one chamber of Congress is controlled by the party opposite from the president
corr_dnp: daily news pressure          
corr_dnp_Div: daily news pressure interacted with indicator for divided government  
nextday_corr_dnp: leading value of daily news pressure  
nextday_corr_dnp_Div: leading value of daily news pressure interacted with indicator for divided government  
prevday_corr_dnp: lagged value of daily news pressure  
prevday_corr_dnp_Div: lagged value of daily news pressure  interacted with indicator for divided government 
prevday_corr_dnp_2 - prevday_corr_dnp_7: 2-7 lagged values of daily news pressure      
prevday_corr_dnp_2_div - prevday_corr_dnp_7_div: 2-7 lagged values of daily news pressure, each interacted with indicator for divided government
nextday_corr_dnp_2 - nextday_corr_dnp_7: 2-7 leading values of daily news pressure      
nextday_corr_dnp_2_div - nextday_corr_dnp_7_div: 2-7 leading values of daily news pressure, each interacted with indicator for divided government
__month*: indicator for month of the year 
__year*: indicator for year 
__dow*: indicator for day of week  
week_no: weeks since incumbent president was inaugurated
year_month: month and year combination

